<template>
    <div class="body">
        <div class="box">
            <img class="img" src="/images/login.png">
            <!-- <form action="">
                <div class="row">
                    <img class="icon" src="/icons/icon.png">
                    <span>校务管理系统</span>
                </div>
                <el-input
                    v-model="input"
                    style="width: 240px"
                    placeholder="Please input"
                    clearable
                />
                <el-button type="primary" @click="onSubmit">登录</el-button>
            </form> -->
            
            <!-- 用户登录表单 -->
            <el-form
                :model="user"
                label-width="auto"
                style="max-width: 400px"
                :rules="rules"
                ref="loginFormRef"
                @submit="handleLogin"
            >
                <el-form-item label="用户名" prop="username">
                <el-input v-model="user.username" placeholder="请输入用户名" />
                </el-form-item>
                <el-form-item label="密码" prop="password">
                <el-input
                    v-model="user.password"
                    type="password"
                    placeholder="请输入密码"
                    show-password
                />
                </el-form-item>
                <el-form-item>
                <el-checkbox v-model="user.remember" name="type">
                    记住用户名与密码
                </el-checkbox>
                </el-form-item>
                <el-form-item>
                <el-button
                    type="primary"
                    native-type="submit"
                    class="login-btn"
                >登录</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>    
</template>
  
<script lang="ts" setup>
    import { ref } from 'vue'

    const 
</script>

<style scoped lang="scss">
    .body{
        // width: 1536px;
        // height: 729px;
        // width: 100ph;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #f0f5f5;
        .box{
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,.2);

            .img{
            width: 240px;
            height: 340px;
            border-top-left-radius: 10px;
            border-bottom-left-radius: 10px;
        }

        form{
            width: 340px;
            height: 340px;
            display: flex;
            flex-direction: column;
            background-color: #fff;
            border-top-right-radius: 10px;
            border-bottom-right-radius: 10px;

            .icon{
                width: 40px;
            }
            .row{
                display: flex;
                flex-direction: row;
                justify-content: center;
                align-items: center;
                margin-bottom: 20px;
            }
        }
        }

        
    }
</style>